R = @(s) exp(-s);
sig = @(s) cos(exp(s));
test2(R,sig,1)